package p.ithorns.example.validator;

import javax.validation.ConstraintViolation;
import java.util.Set;

/**
 * TestCase
 *
 * @author HtL
 * @date 2025/3/13 15:22
 * @since 1.0.0
 */
public class TestCase {

    public static void main(String[] args) {
        TestClass req = new TestClass();
        req.setType(1);
        req.setValue(50);
        Set<ConstraintViolation<TestClass>> validate = Validators.validate(req);
        for (ConstraintViolation<TestClass> violation : validate) {
            // String filedName = violation.getPropertyPath().toString();
            String message = violation.getMessage();
            System.out.println( message);
        }
    }

}